package com.twu.biblioteca.library.shelf;

import com.twu.biblioteca.control.Strings;
import com.twu.biblioteca.library.item.LibraryItem;
import com.twu.biblioteca.library.item.Movie;
import java.util.TreeSet;

public class MovieShelf extends Shelf {

    public MovieShelf() {
        collection = new TreeSet<LibraryItem>();
        collection.add(new Movie(1, "Movie1", "Director1", 2000, 0));
        collection.add(new Movie(2, "Movie2", "Director2", 2001, 1));
        collection.add(new Movie(3, "Movie3", "Director3", 2002, 2));
    }

    public boolean checkoutItem(int id, String libraryNumber) {
        Movie movie = (Movie)findItem(id);
        if (movie != null) {
            System.out.println(Strings.movieCheckoutEnjoy);
            return true;
        }
        System.out.println(Strings.movieCheckoutSorry);
        return false;
    }

}
